package com.quectel.core.module.prewarning.dto;

import com.quectel.core.module.village.dto.VillageDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author caolu
 * @email louis.cao@quectel.com
 * @date 2021-11-30 15:15:56
 */
@Data
@Schema
public class PreWarningRecordHistoryDto implements Serializable {

    /**
     * 主键
     */
    @Schema(description = "主键")
    private Long id;

    /**
     * 租户id
     */
    @Schema(description = "租户id")
    private Long tenantId;

    /**
     * 小区id
     */
    @Schema(description = "小区id")
    private Long villageId;

    /**
     * 人员id/车辆id 根据type来处理
     */
    @Schema(description = "人员id/车辆id 根据type来处理")
    private Long objId;

    /**
     * 车牌颜色 车牌颜色 1蓝底白字 2黄底黑字 3白底黑字 4绿底黑字 5黑底白字 6 02式车牌 7粤Z车牌 8FV车牌 9其他
     */
    @NotNull
    private Byte licenseColor;

    /**
     * 车牌号
     */
    @Schema(description = "车牌号")
    private String license;

    /**
     * 人员名
     */
    @Schema(description = "人员名")
    private String personName;

    /**
     * 预警类型
     */
    @Schema(description = "预警类型")
    private Byte preWarnType;

    /**
     * 频率
     */
    @Schema(description = "频率")
    private Integer frequency;

    /**
     * 最后一次记录时间
     */
    @Schema(description = "最后一次记录时间")
    private Date lastAccessTime;

    /**
     * 最后抓拍
     */
    @Schema(description = "最后一次抓拍图片")
    private String lastSnapImages;

    /**
     * 预警配置id
     */
    @Schema(description = "预警配置id")
    private Long configId;

    /**
     * 预警配置备份
     */
    @Schema(description = "预警配置备份")
    private String configBak;

    /**
     * 告警时间
     */
    @Schema(description = "告警时间")
    private Date alarmTime;

    /**
     * 检测时间
     */
    @Schema(description = "检测时间")
    private Date checkTime;

    /************非数据库字段 start ************/
    @Schema(description = "小区信息")
    private VillageDto village;
    @Schema(description = "预警配置名")
    private String warnConfigName;
    @Schema(description = "告警描述")
    private String warnDesc;
    @Schema(description = "当前预警值")
    private String diffValue;
    /************非数据库字段 end **************/
}
